
#include"SeqList.h"

void SeqListTest1()
{
	SL sl;
	SeqListInit(&sl);
	SeqListPushBack(&sl, 1);
	SeqListPushBack(&sl, 2);
	SeqListPushBack(&sl, 3);
	SeqListPushBack(&sl, 4);
	SeqListPushBack(&sl, 5);
	SeqListPrint(&sl);
	SeqListPopBack(&sl);
	SeqListPopBack(&sl);
	SeqListPrint(&sl);
	SeqListDestroy(&sl);

}

void SeqListTest2()
{
	SL sl;
	SeqListInit(&sl);
	SeqListPushBack(&sl, 1);
	SeqListPushBack(&sl, 2);
	SeqListPushBack(&sl, 3);
	SeqListPushBack(&sl, 4);
	SeqListPushBack(&sl, 5);
	SeqListPushFront(&sl, 6);
	SeqListPrint(&sl);
	int a=SeqListFind(&sl, 3);
	printf("%d\n", a);
	SeqListPopFront(&sl);
	SeqListPrint(&sl);
	SeqListDestroy(&sl);
}
void SeqListTest3()
{
	SL sl;
	SeqListInit(&sl);
	SeqListPushBack(&sl, 1);
	SeqListPushBack(&sl, 2);
	SeqListPushBack(&sl, 3);
	SeqListPushBack(&sl, 4);
	SeqListPushBack(&sl, 5);
	SeqListPrint(&sl);
	SeqListInsert(&sl, 2, 9);
	SeqListPrint(&sl);
	SeqListErase(&sl, 3);
    SeqListPrint(&sl);
	SeqListDestroy(&sl);
}
int main()
{
	/*SeqListTest1();*/
	//SeqListTest2();
	SeqListTest3();
}
